package com.mszlu.blog.vo.params;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class PageParams {
    @ApiModelProperty("页数")
    private int page = 1;
    @ApiModelProperty("一页n行")
    private int pageSize = 10;
    @ApiModelProperty("目录Id")
    private Long categoryId;
    @ApiModelProperty("标签Id")
    private Long tagId;
    @ApiModelProperty("年")
    private String year;
    @ApiModelProperty("月")
    private String month;
    @ApiModelProperty("获取月份")
    public String getMonth(){
        if(this.month !=null && this.month.length() ==1 ){
            return "0"+this.month;
        }
        return  month;
    }
}
